home *** CD-ROM | disk | FTP | other *** search
/ Cyber Strip Poker / Cyber Strip Poker.rar / IMAGE.img / black2.dir / 00001_Script_1 next >
Text File  |  1995-08-10  |  12KB  |  515 lines

  1. on startmovie
  2.   puppetsprite 15, true
  3.   set the locH of sprite 15 to 90
  4.   set the locV of sprite 15 to 45
  5.   set the castnum of sprite 15 to 248
  6.   puppetsprite 16, true
  7.   set the locH of sprite 16 to 40
  8.   set the locV of sprite 16 to 45  
  9.   set the castnum of sprite 16 to 248
  10.   puppetsprite 17, true
  11.   set the locH of sprite 17 to 140
  12.   set the locV of sprite 17 to 45
  13.   set the castnum of sprite 17 to 248
  14.   puppetsprite 18, true
  15.   set the locH of sprite 18 to 190
  16.   set the locV of sprite 18 to 45
  17.   set the castnum of sprite 18 to 248
  18.   puppetsprite 19, true
  19.   set the locH of sprite 19 to 240
  20.   set the locV of sprite 19 to 45
  21.   set the castnum of sprite 19 to 248
  22.   puppetsprite 20, true 
  23.   set the locH of sprite 20 to 381
  24.   set the locV of sprite 20 to 382
  25.   set the castnum of sprite 20 to 248
  26.   puppetsprite 21, true
  27.   set the locH of sprite 21 to 431
  28.   set the locV of sprite 21 to 382
  29.   set the castnum of sprite 21 to 248
  30.   puppetsprite 22, true
  31.   set the locH of sprite 22 to 481
  32.   set the locV of sprite 22 to 382
  33.   set the castnum of sprite 22 to 248
  34.   puppetsprite 23, true
  35.   set the locH of sprite 23 to 531
  36.   set the locV of sprite 23 to 382
  37.   set the castnum of sprite 23 to 248
  38.   puppetsprite 24, true
  39.   set the locH of sprite 24 to 581
  40.   set the locV of sprite 24 to 382
  41.   set the castnum of sprite 24 to 248 
  42.   
  43.   global ybank,dbank,pot,hardamount
  44.   set hardamount = 500
  45.   set pot=10
  46.   set ybank=HardAmount
  47.   set dbank=HardAmount
  48. end startmovie
  49.  
  50. on M13inch
  51.   global size
  52.   set size=true
  53.   set the text of cast B24 to "PLACE BET AT LEFT AND HIT OK"
  54.   set the text of cast B28 to "INSURE YOURSELF OR HIT OK"
  55.   set the text of cast B25 to "SELECT AN OPTION AT LEFT"
  56.   set the locV of sprite 20 to 382
  57.   set the locV of sprite 21 to 382
  58.   set the locV of sprite 22 to 382
  59.   set the locV of sprite 23 to 382
  60.   set the locV of sprite 24 to 382 
  61. end M13inch
  62.  
  63. on M12inch
  64.   NOTHING
  65. end M12inch
  66.  
  67. on newgame2 amt
  68.   global HardAmount
  69.   set hardamount=amt
  70.   go "Restarter"
  71. end newgame2
  72.  
  73. on init
  74.   M13inch
  75.   ablemenu ("options",false)
  76.   ablemenu ("bet", false)
  77.   ablemenu ("Insure",false)
  78.   global NumCards, CardNum, Card, ybank,dbank,pot, insured, size , hardamount
  79.   set pot=10
  80.   set ybank=HardAmount
  81.   set dbank=HardAmount
  82.   set insured=0
  83.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  84.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  85. return&return&"BANK:"&return&"$"&ybank 
  86.   put 156 into numcards
  87.   put 0 into cardnum
  88.   put Array(mnew) into Card
  89.   repeat while cardnum<numcards
  90.     card(mPut, cardnum, (cardnum mod 52)) 
  91.     set cardnum=cardnum+1
  92.   end repeat
  93.   
  94.   
  95.   global tencards, cardVal
  96.   put 0 into tencards
  97.   put array2(mnew) into cardVal
  98.   repeat while tencards<10
  99.     cardval(mput, tencards, 0)
  100.     set tencards=tencards+1
  101.   end repeat
  102. end init
  103.  
  104. on shuffle
  105.   global Numcards, Cardnum, Card
  106.   set cardnum=0
  107.   set temp1 = 0
  108.   set temp2 = 0
  109.   repeat while (cardnum<(numcards*4))
  110.     set tempnum1 = ((random(numcards))-1)
  111.     set tempnum2 = ((random(numcards))-1)
  112.     set temp1=card(mget,tempnum1)
  113.     set temp2=card(mget,tempnum2)
  114.     card(mput,tempnum1,temp2)
  115.     card(mput,tempnum2,temp1)
  116.     set cardnum=cardnum+1
  117.   end repeat
  118.   set cardnum=0 
  119. end shuffle
  120.  
  121. factory Array
  122.   -- 
  123. end Array
  124.  
  125. factory Array2
  126.   --
  127. end Array2
  128.  
  129. on getcard slot, val
  130.   global card, cardnum, numcards, cardval, dfirstcard
  131.   set the castnum of sprite slot to (193+card(mget, cardnum))
  132.   
  133.   if slot =15 then
  134.     set dfirstcard = (193+card(mget,cardnum))
  135.     set the castnum of sprite 15 to 245
  136.   end if
  137.   
  138.   set temp=0
  139.   set temp= (card(mget,cardnum) mod 13)
  140.   set temp=temp+2
  141.   if (temp=11 or temp=12 or temp=13) then set temp=10
  142.   if temp=14 then set temp=11
  143.   cardval(mput, val, temp)
  144.   
  145.   set cardnum=cardnum +1  
  146.   if cardnum = numcards then play "shuffle"
  147. end getcard
  148.  
  149. on newgame
  150.   global tencards, cardVal,dfirstcard, insured
  151.   set insured=0
  152.   set dfirstcard=245
  153.   put 0 into tencards
  154.   repeat while tencards<10
  155.     cardval(mput, tencards, 0)
  156.     set tencards=tencards+1
  157.   end repeat
  158.   set the castnum of sprite 15 to 248
  159.   set the castnum of sprite 16 to 248
  160.   set the castnum of sprite 17 to 248 
  161.   set the castnum of sprite 18 to 248
  162.   set the castnum of sprite 19 to 248
  163.   set the castnum of sprite 20 to 248
  164.   set the castnum of sprite 21 to 248
  165.   set the castnum of sprite 22 to 248
  166.   set the castnum of sprite 23 to 248
  167.   set the castnum of sprite 24 to 248 
  168. end newgame
  169.  
  170. on betdeductions
  171.   global ybank,dbank,pot,size
  172.   set ybank=ybank-pot
  173.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  174.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  175. return&return&"BANK:"&return&"$"&ybank 
  176. end betdeductions
  177.  
  178. on hit1
  179.   global ytotal
  180.   getcard (22,2)
  181.   ycountcards
  182.   if ytotal =21 then
  183.     go "end"
  184.     exit  
  185.   end if
  186.   if ytotal=0 then
  187.     go "Dwin"
  188.     exit
  189.   end if
  190.   go "round2"
  191. end hit1
  192.  
  193. on hit2
  194.   global ytotal
  195.   getcard (23,3)
  196.   ycountcards
  197.   if ytotal =21 then
  198.     go "end"
  199.     exit  
  200.   end if
  201.   if ytotal=0 then
  202.     go "Dwin"
  203.     exit
  204.   end if
  205.   go "round3"
  206. end hit2
  207.  
  208. on hit3
  209.   global ytotal
  210.   getcard (24,4)
  211.   ycountcards
  212.   if ytotal =21 then
  213.     go "end"
  214.     exit  
  215.   end if
  216.   if ytotal=0 then
  217.     go "Dwin"
  218.     exit
  219.   end if
  220.   go "Lhit"
  221. end hit3
  222.  
  223. on DD
  224.   global ytotal
  225.   getcard (24,4)
  226.   ycountcards
  227.   if ytotal =21 then
  228.     go "end"
  229.     exit  
  230.   end if
  231.   if ytotal=0 then
  232.     go "Dwin"
  233.     exit
  234.   end if
  235. end DD
  236.  
  237. on ycountcards
  238.   global cardval,ytotal, ybank,dbank,pot,size,extra
  239.   set ytotal=0
  240.   set temp1=cardval(mget,0)
  241.   set temp2=cardval(mget,1) 
  242.   set temp3=cardval(mget,2)
  243.   set temp4=cardval(mget,3) 
  244.   set temp5=cardval(mget,4)
  245.   
  246.   set extra = 0
  247.   --equal 21
  248.   if temp1+temp2=21 then
  249.     set ytotal=21
  250.     set the text of cast "yresult" to "You Drew A Natural Blackjack!!!"
  251.     set the text of cast "dresult" to "I Pay You 1.5 to 1"
  252.     set extra=(pot/2)
  253.     set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  254.     if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  255. return&return&"BANK:"&return&"$"&ybank 
  256.     go "Ywin"
  257.     exit
  258.   end if
  259.   if temp1+temp2+temp3+temp4+temp5=21 then
  260.     set ytotal=21
  261.     set the text of cast "yresult" to "You Got 21"
  262.     go "end"
  263.     exit
  264.   end if
  265.   
  266.   --over 21
  267.   if temp1+temp2+temp3+temp4+temp5>21 then 
  268.     --if Ace
  269.     if temp1=11 then 
  270.       cardval(mput,0,1)
  271.       ycountcards
  272.       exit 
  273.     end if
  274.     if temp2=11 then 
  275.       cardval(mput,1,1)
  276.       ycountcards
  277.       exit 
  278.     end if
  279.     if temp3=11 then 
  280.       cardval(mput,2,1)
  281.       ycountcards
  282.       exit 
  283.     end if
  284.     if temp4=11 then 
  285.       cardval(mput,3,1)
  286.       ycountcards
  287.       exit 
  288.     end if
  289.     if temp5=11 then 
  290.       cardval(mput,4,1)
  291.       ycountcards
  292.       exit 
  293.     end if
  294.     --bust
  295.     set ytotal=0
  296.     set the text of cast "Yresult" to "You Busted"
  297.     set the text of cast "Dresult" to "I Win By Default"
  298.     exit   
  299.   end if
  300.   
  301.   --under 21
  302.   set ytotal =Temp1+temp2+temp3+temp4+temp5
  303.   set the text of cast "yresult" to "You have "&ytotal 
  304.   
  305. end ycountcards
  306.  
  307. on dcountcards
  308.   global cardval,dtotal,ytotal
  309.   set dtotal=0
  310.   set temp1=cardval(mget,5)
  311.   set temp2=cardval(mget,6) 
  312.   set temp3=cardval(mget,7)
  313.   set temp4=cardval(mget,8) 
  314.   set temp5=cardval(mget,9)
  315.   
  316.   --equal 21
  317.   if temp1+temp2=21 then
  318.     set dtotal=21
  319.     set the text of cast "Dresult" to "I Drew Natural Blackjack"
  320.     go "after"
  321.     exit
  322.   end if
  323.   if temp1+temp2+temp3+temp4+temp5=21 then
  324.     set dtotal=21
  325.     set the text of cast "Dresult" to "I Got 21"
  326.     go "after"
  327.     exit
  328.   end if
  329.   
  330.   --over 21
  331.   if temp1+temp2+temp3+temp4+temp5>21 then 
  332.     --if Ace
  333.     if temp1=11 then 
  334.       cardval(mput,5,1)
  335.       ycountcards
  336.       exit 
  337.     end if
  338.     if temp2=11 then 
  339.       cardval(mput,6,1)
  340.       ycountcards
  341.       exit 
  342.     end if
  343.     if temp3=11 then 
  344.       cardval(mput,7,1)
  345.       ycountcards
  346.       exit 
  347.     end if
  348.     if temp4=11 then 
  349.       cardval(mput,8,1)
  350.       ycountcards
  351.       exit 
  352.     end if
  353.     if temp5=11 then 
  354.       cardval(mput,9,1)
  355.       ycountcards
  356.       exit 
  357.     end if
  358.     --bust 
  359.     set dtotal=0
  360.     set the text of cast "Dresult" to "I Busted"
  361.     set the text of cast "Yresult" to "You Winà"  
  362.     go "Ywin"
  363.     exit
  364.   end if
  365.   
  366.   --under 21
  367.   set dtotal =temp1+temp2+temp3+temp4+temp5
  368.   set the text of cast "Dresult" to "I have "&Dtotal
  369.   if dtotal>16 then
  370.     go "After"
  371.     exit
  372.   end if
  373. end dcountcards
  374.  
  375. on Ymoney
  376.   global ybank,dbank,pot,size,extra
  377.   set dbank=dbank-pot
  378.   set ybank=ybank+(2*pot)
  379.   set ybank=ybank+extra
  380.   set dbank=dbank-extra
  381.   set pot=10
  382.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  383.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  384. return&return&"BANK:"&return&"$"&ybank 
  385. end Ymoney
  386.  
  387. on YTie
  388.   global ybank,dbank,pot,size
  389.   set ybank=ybank+pot
  390.   set pot=10
  391.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  392.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  393. return&return&"BANK:"&return&"$"&ybank 
  394. end YTie
  395.  
  396. on dmoney
  397.   global ybank,dbank,pot,insured,size
  398.   set dbank=dbank+pot
  399.   set pot=10
  400.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  401.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  402. return&return&"BANK:"&return&"$"&ybank 
  403. end dmoney
  404.  
  405. on checkwinner
  406.   global ytotal,dtotal
  407.   if ytotal>dtotal then 
  408.     go "ywin"
  409.     exit
  410.   end if
  411.   if dtotal>ytotal then 
  412.     go "dwin"
  413.     exit
  414.   end if
  415.   go "tie"
  416.   exit
  417. end checkwinner
  418.  
  419. on doubledown
  420.   global ybank,dbank,pot,size
  421.   set ybank=ybank-pot
  422.   set pot=pot+pot
  423.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  424.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  425. return&return&"BANK:"&return&"$"&ybank 
  426. end doubledown
  427.  
  428. on InsureMe
  429.   ablemenu ("insure",false)
  430.   global insured, ybank,dbank,pot,size
  431.   set ybank=ybank-(pot/2)
  432.   set dbank=dbank+(pot/2)
  433.   set insured = 1
  434.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  435.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  436. return&return&"BANK:"&return&"$"&ybank 
  437.   go "round1"
  438. end InsureMe
  439.  
  440. on insureMeNot
  441.   ablemenu ("insure",false)
  442.   go "round1"
  443. end insureMeNot
  444.  
  445. on FaerieOn
  446.   puppetsprite 4, true
  447.   global cardval,cardnum,card
  448.   set temp=0
  449.   set temp= (card(mget,cardnum) mod 13)
  450.   set temp=temp+2
  451.   if (temp=11 or temp=12 or temp=13) then set temp=10
  452.   if temp=14 then set temp=1
  453.   If cardval(mget,0)+cardval(mget,1)+cardval(mget,2)+cardval(mget,3)+cardval(mget,4)+temp>21 then
  454.     set the castNum of sprite 4 to the number of cast "Stay"
  455.     exit
  456.   end if
  457.   set the castNum of sprite 4 to the number of cast "Hit" 
  458. end FaerieOn
  459.  
  460. on bossStart
  461.   when timeout then Nothing
  462.   sound stop 1
  463.   sound stop 2
  464. end bossStart
  465.  
  466. on bossOver
  467.   nothing
  468. end bossOver
  469.  
  470. on stopmovie
  471.   puppetsprite 7, false 
  472.   puppetsprite 15, false
  473.   puppetsprite 16, false 
  474.   puppetsprite 17, false 
  475.   puppetsprite 18, false  
  476.   puppetsprite 19, false
  477.   puppetsprite 20, false
  478.   puppetsprite 21, false 
  479.   puppetsprite 22, false 
  480.   puppetsprite 23, false  
  481.   puppetsprite 24, false
  482. end stopmovie
  483.  
  484. on bet amount
  485.   global pot,ybank
  486.   set pot=amount
  487.   set the text of cast "Info" = "BET:"&return&"$"&POT&return&return&"BANK:"&return&"$"&ybank 
  488.   go "Postbet"
  489. end bet
  490.  
  491. on Hitter
  492.   ablemenu ("options",false)
  493.   if the frame < 37 then
  494.     hit1
  495.     exit
  496.   end if
  497.   if the frame > 41 then
  498.     hit3
  499.     exit
  500.   end if
  501.   if the frame >37 and the frame <41 then 
  502.     hit2 
  503.     exit
  504.   end if   
  505. end hitter 
  506.  
  507. on ablemenu themenu, flag
  508.   NOTHING
  509. end ablemenu
  510.  
  511.  
  512.  
  513.  
  514.  
  515.